home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / samba.idb / usr / samba / docs / PRINTER_DRIVER.txt.z / PRINTER_DRIVER.txt
Encoding:
Text File  |  1998-10-28  |  7.9 KB  |  241 lines

  1. !==
  2. !== PRINTER_DRIVER.txt for Samba release 1.9.18p10 20 Aug 1998
  3. !==
  4. ==========================================================================
  5.     Supporting the famous PRINTER$ share
  6.  
  7.      Jean-Francois.Micouleau@utc.fr, 10/26/97
  8.     modified by herb@sgi.com 1/2/98
  9.  
  10. ===========================================================================
  11.  
  12. Disclaimer:
  13.  
  14.     This ONLY works with Windows 95
  15.     It does NOT work with Windows NT 4
  16.  
  17.  
  18. Goal:
  19.  
  20.     When you click on a samba shared printer, you can now install the driver
  21.     automatically onto the Windows 95 machine, as you would from an NT server.
  22.     
  23. How To:
  24.  
  25.     It's a three step config.
  26.     
  27.     First, create a new directory, where you will put the driver files, and
  28.     make a share in smb.conf pointing to it.
  29.  
  30.     Example:
  31.     
  32.         [printer$]
  33.              path=/usr/local/samba/printer
  34.              public=yes
  35.              writable=no
  36.              browseable=yes
  37.  
  38.     Second, you have to build the list of drivers required for a specific
  39.     printer. This is the most complicated thing to do. Get the files
  40.     'msprint.inf' and 'msprint2.inf' from Windows 95, the easiest way is to
  41.     grab them from a working Windows 95 computer. They are usually located
  42.     in 'c:\windows\inf'. Look in them for the printer you have. Run the new
  43.     program 'make_printerdef' with the file name and the printer name as
  44.     parameters. If you have drivers for an unsupported or updated printer,
  45.     first install these drivers on an Windows 95 system. There will be a
  46.     file created in your inf directory named 'oem?.inf' (where the ? is some
  47.     number). Use this file instead of msprint.inf.
  48.  
  49.     Example: (from the /usr/local/samba/lib directory)
  50.         
  51.     make_printerdef msprint.inf "Apple LaserWriter" >> printers.def
  52.      
  53.     The program will print out a list of required files to stderr.
  54.     Copy all the files listed into the directory you created in step 1.
  55.     If you have "preserve case = yes" make sure your files names match
  56.     EXACTLY the names listed.
  57.     
  58.     Third, you need to add 2 new parameters in smb.conf. One is in the
  59.     [global] section, called 'printer driver file' pointing to the printer
  60.     description file you just created, and the other in each printer share,
  61.     called 'printer driver location' pointing to where the client will get 
  62.     the drivers. Don't forget to set correctly the printer driver parameter
  63.     to the Windows printer name.
  64.  
  65.     Example:
  66.     
  67.         [global]
  68.             printer driver file=/usr/local/samba/lib/printers.def
  69.  
  70.         [lp]
  71.            comment = My old printer laser
  72.            browseable = yes
  73.            printable = yes
  74.            public = yes
  75.            writable = no
  76.            create mode = 0700
  77.            printer driver=Apple LaserWriter
  78.            printer driver location=\\%h\PRINTER$
  79.  
  80.     %h will expand to the computer name, and PRINTER$ is the name of the
  81.     share created in step one.
  82.     
  83.     
  84. If it doesn't work for you, don't send flame ! It worked for me. In case of
  85. trouble don't hesitate to send me a mail with your smb.conf file and 
  86. printers.def
  87.  
  88.  
  89. *******  added by herb@sgi.com
  90.  
  91. For those of you who like to know the details, and in case I have guessed
  92. wrong on some of the fields - The following is the format of the entries 
  93. in the printers.def file: (entries are 1 single line - they are split here 
  94. for readability)
  95.  
  96. <Long Printer Name>:<Driver File Name>:<Data File Name>:<Help File Name>:
  97. <Language Monitor Name>:<Default Data Type>:<Comma Separated list of Files>
  98.  
  99. The <Help File Name> and the <Language Monitor Name> can be empty.
  100. If no <Driver File Name> or <Data File Name> are specified in the inf file,
  101. these will default to the section name for the printer.
  102.  
  103. The following is an excerpt from the MSPRINT2.INF file on a WIN95 machine.
  104. I have deleted all but the entries relating to installing a driver for the
  105. "QMS ColorScript 100 Model 30" printer. Using this "file" I'll try to 
  106. explain how the printers.def file is created.
  107.  
  108. make_printerdef is run with the first argument being the name of this
  109. file (MSPRINT2.INF in this case) and the second argument being the
  110. name of the printer ("QMS ColorScript 100 Model 30" in this case).
  111.  
  112. The printer name is first found in the "Model section" to obtain the
  113. name of the "Installer Section" (this is the name after the equal sign).
  114. We ignore the alternate name.
  115.  
  116. The "Installer Section" contains entries for "CopyFiles" and "DataSection".
  117. The "CopyFiles" line gives a list of all the required files for this
  118. printer. If the name begins with an @ it is the name of a file (after
  119. you strip off the @), otherwise it is the name of a "Copy Section" which
  120. in turn is a list of files required. This printer has one file listed
  121. "QCS30503.SPD" and two sections "COLOR_QMS_100_30" and "PSCRIPT". The
  122. "COLOR_QMS_100_30" section is listed in the "[DestinationDirs]" as 
  123. having a value of 23. This means that all files listed in this section
  124. should go into the "color" subdirectory. The list of files to copy for
  125. this printer is thus:
  126.  
  127. QCS30503.SPD,color\QMS10030.ICM,PSCRIPT.DRV,PSCRIPT.HLP,PSCRIPT.INI,
  128. TESTPS.TXT,APPLE380.SPD,FONTS.MFM,ICONLIB.DLL,PSMON.DLL
  129.  
  130. From the "Data Section" we obtain values for "DriverFile", "HelpFile",
  131. and "LanguageMonitor". The % around the value for "LanguageMonitor"
  132. indicates that it is a string that can be localized so its actual value
  133. is obtained from the "[Strings]" section. The "Data Section" could also
  134. have contained an entry for "DefaultDataType".
  135.  
  136. Using the information we have obtained we can now construct the entry
  137. for the printers.def file.
  138.  
  139. <Long Printer Name>     -> QMS ColorScript 100 Model 30  (name given
  140.                 on the command line)
  141. <Driver File Name>      -> PSCRIPT.DRV  (given in Data Section)
  142. <Data File Name>        -> QCS30503.SPD (defaults to Install Section name)
  143. <Help File Name>        -> PSCRIPT.HLP  (given in Data Section)
  144. <Language Monitor Name> -> PostScript Language Monitor  (given in Data Section)
  145. <Default Data Type>     -> RAW (default if not specified)
  146.  
  147.  
  148. So.... the enty (actually one line but split here for readability) would
  149. be:
  150.  
  151. QMS ColorScript 100 Model 30:PSCRIPT.DRV:QCS30503.SPD:
  152. PSCRIPT.HLP:PostScript Language Monitor:RAW:
  153. QCS30503.SPD,color\QMS10030.ICM,PSCRIPT.DRV,PSCRIPT.HLP,PSCRIPT.INI,
  154. TESTPS.TXT,APPLE380.SPD,FONTS.MFM,ICONLIB.DLL,PSMON.DLL
  155.  
  156. ---------------------- Info from MSPRINT2.INF ------------------------
  157. ;
  158. ; The Manufacturer section lists all of the manufacturers that we will
  159. ; display in the Dialog box
  160.  
  161. [Manufacturer]
  162. "QMS"
  163.  
  164.  
  165. ;
  166. ; Model sections. Each section here corresponds with an entry listed in the
  167. ; [Manufacturer] section, above. The models will be displayed in the order
  168. ; that they appear in the INF file.
  169. ;
  170. ; Each model lists a variation of its own name as a compatible ID. This
  171. ; is done primarily as an optimization during upgrade.
  172. ;
  173. [QMS]
  174. "QMS ColorScript 100 Model 30"    = QCS30503.SPD,QMS_ColorScript_100_Model_30
  175.  
  176.  
  177. ;
  178. ; Installer Sections
  179. ;
  180. ; These sections control file installation, and reference all files that
  181. ; need to be copied. The section name will be assumed to be the driver
  182. ; file, unless there is an explicit DriverFile section listed.
  183. ;
  184. [QCS30503.SPD]
  185. CopyFiles=@QCS30503.SPD,COLOR_QMS_100_30,PSCRIPT
  186. DataSection=PSCRIPT_DATA
  187.  
  188. ; Copy Sections
  189. ;
  190. ; Lists of files that are actually copied. These sections are referenced
  191. ; from the installer sections, above. Only create a section if it contains
  192. ; two or more files (if we only copy a single file, identify it in the
  193. ; installer section, using the @filename notation) or if it's a color
  194. ; profile (since the DestinationDirs can only handle sections, and not
  195. ; individual files).
  196. ;
  197. [COLOR_QMS_100_30]
  198. QMS10030.ICM
  199.  
  200. [PSCRIPT]
  201. PSCRIPT.DRV
  202. PSCRIPT.HLP
  203. PSCRIPT.INI
  204. TESTPS.TXT
  205. APPLE380.SPD
  206. FONTS.MFM
  207. ICONLIB.DLL
  208. PSMON.DLL
  209.  
  210.  
  211. ;
  212. ; Data Sections
  213. ;
  214. ; These sections contain data that is shared between devices.
  215. ;
  216. [PSCRIPT_DATA]
  217. DriverFile=PSCRIPT.DRV
  218. HelpFile=PSCRIPT.HLP
  219. LanguageMonitor=%PS_MONITOR%
  220.  
  221.  
  222. ;
  223. ; Color profiles go to the colors directory. All other files go to the
  224. ; system directory
  225. ;
  226.  
  227. [DestinationDirs]
  228. DefaultDestDir=11
  229. COLOR_QMS_100_30=23
  230. COLOR_TEKTRONIX_200I=23
  231. COLOR_TEKTRONIX_III_PXI=23
  232.  
  233.  
  234. ;
  235. ; Localizable Strings
  236. ;
  237. [Strings]
  238. MS="Microsoft"
  239. PS_MONITOR="PostScript Language Monitor,PSMON.DLL"
  240.  
  241.